Using DEDECMS to customize a Send mail php file, using the dedecms comes with mail.class.php, can be sent locally, after uploading to the server, prompted cannot connenct to relay host Smtp.qq.com Error: () error:cannot send email to [email protected] online to find a lot of articles, finally solved, the problem is in the server environment configuration. Find php.ini, see two places, one is Allow_url_fopen
Use dedecms to customize a mail to send the PHP file, using the dedecms of the mail.class.php, local can be sent, upload to the server, appear prompted cannot connenct to relay host Smtp.qq.com Error: () error:cannot send email to XXX@qq.com online Find a lot of articles, finally resolved, the problem is in the server's environment configuration.
Find PHP.ini, look at two places, one is Allow_url_fopen, th
Open relay are generally not open on many servers
However, some servers support open.
But the above services are based on the hardware environment!
I think the people think, I thought of a way to use virtual relay!
Intercepts the string that the user will send at the end of the @, spelling it into a mailserver, The mailserver that the sender is sending is the mailserver I intercepted. In this way, Mailsmtps
the corporate mail server as a smart host. You can then configure a stand-alone SMTP virtual server to relay messages that are sent only to remote domains. In this case, all other messages will be rejected and not relayed.
How to configure a stand-alone IIS SMTP server to relay
Microsoft offers 3 ways to set up a multifunction device (printer, scanner, etc.) or an application in your enterprise to send e-mail using Office 365:
SMTP Client Submission
Send directly
SMTP Relay
The above 3 ways of introduction, we can refer to Techent link: https://technet.microsoft.com/zh-cn/library/dn554323 (v=exchg.150). aspxI'm foc
Objective
You must be familiar with the "SpeedPost" in Foxmail, it can send e-mail directly to each other's mail server, without the need to go through the SMTP server relay, so what is the benefit? First: Send faster, do not need to wait for the SMTP server to the mail for drug search, distribution, verification; second: You can keep abreast of whether the mess
box is displayed: enter the domain name, which must be the domain name of the mailbox on the Internet, or the part after the @ you sent the email. 5. Right-click "SMTP virtual server" and select "properties ", here, "access"-"relay restrictions" and "pass"-"advanced" Settings (the domain name is set to your own domain name, PS: Fully Qualified Domain Name, I used the local prefix, you can also skip this
Phpmailer is a great open source messaging class, and it's very simple to use, but for a virtual host, there are always restrictions. Just now I encountered an "SMTP error:could not connect to SMTP host" error using Phpmailer on a virtual host. Here are two ways to fix this:
(1) The server cannot send mail using SMTP
Workaround: Many sites listed the solution is because of the SMTP case, although the nature of the problem is not here, but do need to change this place, as for why, look at the following operation.
In class.phpmailer.php, you will:
function Issmtp () {$this->mailer= ' SMTP ';}
Change to:
function Issmtp () {$this->mail
(1) The server cannot send emails using smtp.
Solution: the solution listed by many websites is due to the smtp case sensitivity problem. Although the problem is not here in essence, it must be changed. For the reason, refer to the following operations.
In class. phpmailer. php, set:
function IsSMTP(){$this->Mailer='smtp';}
Changed:
function IsSMTP(){$this->Maile
Cause analysisIf this problem occurs, the name of the SMTP host Solution: It depends on the email payment does not support sending and receiving mails by pop3. This can be viewed officially by email, such as QQ mail.Phpmailer error SMTP Error: cocould not connect to SMTP host
SMTP error:could not connect to SMTP host.
I use the Web page runtime Normal, can send, with the command to run PHP file times wrong, the main code is checked correctly, as follows
function SendMail ($setEmail, $setName, $body, $subject) {Require_once ("phpmail/phpmailer.php");$mail = new Phpmailer (true); The true param means it would throw exceptions on errors
Php PHPMailer sends an Email and cannot connect to the host because the fsockopen function is disabled. PHPmailer sends an Email based on this function.
Modify:
Class. stmp. php
Solution:
1:
Row 3:
$ This-> smtp_conn = fsockopen ($ host, // the host of the server
Changed:
$ This-> smtp_conn = pfsockopen ($ host
PHP Phpmailer Send the message, there is no connection to host, this is because the Fsockopen function is disabled, Phpmailer send email dependent on this function.
Modify:
class.stmp.php
Solve:
1:
118 lines:
$this->smtp_conn = Fsockopen ($host,//The host of the server
Switch
$this->smtp_conn = Pfsockopen ($host,//The
PHP phpmailer sends an email and cannot connect to the host because the fsockopen function is disabled. phpmailer sends an email based on this function.
Modify:
Class. stmp. php
Solution:
1:
Row 3:
$ This-> smtp_conn = fsockopen ($ host, // the host of the server
Changed:
$ This-> smtp_conn = pfsockopen ($ host
HiChina hosts all seem to need to send emails through SMTP, and enable fsockopen. However, the SMTP sending method of WordPress is steam_connect_client instead of fsockopen.
HiChina hosts all seem to need to send emails through SMTP, and to enable fsockopen (this can be enabled in HiChina background. if not, please contact HiChina customer service ). But the
#---------------------------------------------------------------------- --------------
# Encryption key cannot be given
# The username and password are encrypted and decrypted tools are in the Desutil
#--------------------------------------- ---------------------------------------------
#登陆用户名 I wrote it casually,
mail.smtp.username=. cboch2llydmw2432vyrede4tjvjrstamcoe123111
#密码 QQ for authorization code 111111 I wrote it casually
mail.smtp.password= avq5jebimunr5f4wcllzza==
problems encounte
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.